package com.mh.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mh.dao.TopUpRecordsDao;
import com.mh.dto.R;
import com.mh.pojo.TopUpRecords;
import com.mh.service.TopUpRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * (TopUpRecords)表服务实现类
 *
 * @author zmh
 * @since 2023-07-27 16:02:40
 */
@Service
public class TopUpRecordsServiceImpl extends ServiceImpl<TopUpRecordsDao, TopUpRecords> implements TopUpRecordsService {

    @Autowired
    private TopUpRecordsDao topUpRecordsDao;

    /**
     * 分页查询
     *
     * @param page 查询页数
     * @param size 一页显示条数
     * @return ·
     */
    @Override
    public R<Page<TopUpRecords>> getAllByPage(int page, int size) {
        Page<TopUpRecords> topUpRecordsPage = new Page<>(page, size);
        LambdaQueryWrapper<TopUpRecords> queryWrapper = new LambdaQueryWrapper<>();
        //TODO 查询条件定制

        //执行查询
        topUpRecordsDao.selectPage(topUpRecordsPage, queryWrapper);
        return R.success(topUpRecordsPage);
    }
}

